home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
comm
/
tcp
/
Amster-main.lha
/
Amster_Install
/
Rexx
/
MakeServerList.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
2000-10-14
|
1KB
|
44 lines
/*
** Napigator Server List Parser
** $VER: MakeServerList.rexx 0.1 (12.9.2000)
**
** By Roger Clark (kaedric@texas.net)
** September 12, 2000
**
*/
Options Results
crnl = '0d0a'x
If ShowList('H','TCP') Then Do
If Open(Website,'TCP:www.napigator.com/80','W') Then Do
Call WriteCh(Website,'GET /servers.php?version=108 HTTP/1.0')
Call WriteCh(Website,'User-Agent: MakeServerList/0.1;'||crnl)
Call WriteCh(Website,'Accept: *;q=1'||crnl)
Call WriteCh(Website,'Host: www.napigator.com'||crnl)
Call WriteCh(Website,crnl)
Data = ReadLn(Website)
If Subword(Data,2,1) ~= 200 Then Do
Call WriteLn(Website,'Quit')
Call Close(Website)
Say 'Error encountered.'
Exit
End
Call Open(Output,'Ram:Amster.servers','W')
Do Until EOF(Website)
Data = ReadLn(Website)
If Pos('.',Word(Data,1)) > 0 Then Call WriteLn(Output,Word(Data,1)' 'Word(Data,2)' 0 COMMENT "'Word(Data,7)'"')
End
Call Close(Output)
Call WriteLn(Website,'Quit')
Call Close(Website)
Say 'Ram:Amster.servers has been sucessfully created!'
End
Else Say 'Unable to connect to napigator.com'
End
Else Do
Say 'Could not access the web. Is your TCP stack started?'
End
Exit